package com.adeng.springbootdemo.cms.entity;

/**
 * venus_cms_notice.notice_type
 * [0:activityWindow:活动弹窗;1:notice:公告;2:noticeWindow:公告弹窗]
 *
 * @author dbGenerator
 * @since 2018-06-25 11:44:11	[db-generator]
 */
public enum NoticeTypeEnum {
    ACTIVITYWINDOW(0, "活动弹窗"),
    NOTICE(1, "公告"),
    NOTICEWINDOW(2, "公告弹窗");

    private final int code;

    private final String remark;

    NoticeTypeEnum(int code, String remark) {
        this.code = code;
        this.remark = remark;
    }

    public int getCode() {
        return code;
    }

    public String getRemark() {
        return remark;
    }

    public static NoticeTypeEnum get(Integer i) {
        if (i == null) {
            return null;
        }

        for (NoticeTypeEnum t : values()) {
            if (t.getCode() == i) {
                return t;
            }
        }
        return null;
    }
}